package com.chixing.ih.module.task.mapper.provider;

import org.apache.ibatis.jdbc.SQL;

/**
 * 目的:
 *
 * @author ：zcw
 * @version: 1.0  2020/9/25 23:03
 */
public class ProgressTaskMapperProvider {


    public String findAll() {
        return new SQL() {{
            SELECT("*");
            FROM("tbl_task_progress");
            WHERE("order_id = #{orderId}");
            ORDER_BY("create_time desc");
        }}.toString();
    }

    public String findOne() {
        return new SQL() {{
            SELECT("*");
            FROM("tbl_task_progress");
            WHERE("id = #{ProgressTaskId}");
        }}.toString();
    }

    public String insertOne() {
        return new SQL() {{
            INSERT_INTO("tbl_task_progress");

            INTO_COLUMNS("order_id", "submit_content", "create_time");
            INTO_VALUES("#{orderId}", "#{subTask}", "#{createTime}");

        }}.toString();
    }

}
